#ifndef __L2CAP_H
#define __L2CAP_H

#include <stdint.h>

#if defined __cplusplus
extern "C" {
#endif

	typedef struct
	{
		uint8_t handle_low;
		uint8_t handle_high;
		uint8_t current_id;
		uint8_t dcid_low;
		uint8_t dcid_high;
		uint8_t scid_low;
		uint8_t scid_high;
	} l2cap_connection;

	void get_l2cap_connection_request(l2cap_connection *connection, uint8_t **pCmd, uint8_t *size);
	void get_l2cap_connection_pending_response(l2cap_connection *connection, uint8_t **pCmd, uint8_t *size);
	void get_l2cap_connection_successful_response(l2cap_connection *connection, uint8_t **pCmd, uint8_t *size);
	void get_l2cap_configuration_request(l2cap_connection *connection, uint8_t **pCmd, uint8_t *size);
	void get_l2cap_configuration_request_mtu(l2cap_connection *connection, uint8_t **pCmd, uint8_t *size);
	void get_l2cap_configuration_response(l2cap_connection *connection, uint8_t **pCmd, uint8_t *size);

#if defined __cplusplus
}
#endif

#endif // __L2CAP_H